﻿

@model S4Store.Models.Markting.GXJHModel
@{
    Layout = null;
    ViewBag.Title = "GXJH";

    S4Store.Models.Chart.Column ChartModel = new S4Store.Models.Chart.Column();
    ChartModel.Name = "广宣投入KPI概况";
    ChartModel.YAxis = "比率";
    ChartModel.XAxis.Add("广宣计划实施率");
    ChartModel.XAxis.Add("纸媒广宣资金占有率");
    ChartModel.XAxis.Add("纸媒广告集客贡献度");
    
    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标";
    series1.Data.Add(Model.Report.ExhibitionKpiStandard.GXJHSSLV);
    series1.Data.Add(Model.Report.ExhibitionKpiStandard.CTGGZJZYLV);
    series1.Data.Add(Model.Report.ExhibitionKpiStandard.CTGGJKGXD);
    
    ChartModel.Serieses.Add(series1);

    S4Store.Models.Chart.ChartSeries series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际";
    series2.Data.Add(Model.Report.GXJHSSLV);
    series2.Data.Add(Model.Report.CTGGZJZYLV);
    series2.Data.Add(Model.Report.CTGGJKGXD);
   
    ChartModel.Serieses.Add(series2);

    List<S4Store.Models.Chart.AdvIndex> AdvIndexs = new List<S4Store.Models.Chart.AdvIndex>();
    S4Store.Models.Chart.AdvIndex index1 = new S4Store.Models.Chart.AdvIndex();
    index1.Size = S4Store.Models.Chart.AdvIndex.IndexSize.Big;
    if (Model.Report.GXSJTFS >= Model.Report.GXJHTFS)
    {
        index1.Type = S4Store.Models.Chart.AdvIndex.IndexType.Green;   
    }else{
        index1.Type = S4Store.Models.Chart.AdvIndex.IndexType.Red;   
    }
    index1.Url = Url.Action("GXJHLS");
    index1.Tip = "广宣计划落实KPI动态";
    index1.Title = "广宣实际投放数与广宣目标投放数的差值";
    index1.Value = (Model.Report.GXSJTFS - Model.Report.GXJHTFS).ToString();
    index1.Item1Name = "广宣实际投放数";
    index1.Item1Value = Model.Report.GXSJTFS.ToString();
    index1.Item2Name = "广宣目标投放数";
    index1.Item2Value = Model.Report.GXJHTFS.ToString();
    AdvIndexs.Add(index1);

    S4Store.Models.Chart.AdvIndex index2 = new S4Store.Models.Chart.AdvIndex();
    index2.Size = S4Store.Models.Chart.AdvIndex.IndexSize.Big;
    if (Model.Report.CTGGZJZYLV >= Model.Report.ExhibitionKpiStandard.CTGGZJZYLV)
    {
        index2.Type = S4Store.Models.Chart.AdvIndex.IndexType.Green;
    }
    else
    {
        index2.Type = S4Store.Models.Chart.AdvIndex.IndexType.Red;
    }
    index2.Url = Url.Action("CTGG");
    index2.Tip = "纸媒广告KPI概况";

    index2.Title = "纸媒广宣实际投放额与纸媒广宣目标投放额的差值";
    index2.Value = (Model.Report.CTGGZJTFE - Model.Report.CTGGZJJHTFE).toInt();
    index2.Item1Name = "纸媒广宣实际投放额";
    index2.Item1Value = Model.Report.CTGGZJTFE.toInt();
    index2.Item2Name = "纸媒广宣目标投放额";
    index2.Item2Value = Model.Report.CTGGZJJHTFE.toInt();
    AdvIndexs.Add(index2);

    S4Store.Models.Chart.AdvIndex index3 = new S4Store.Models.Chart.AdvIndex();
    index3.Size = S4Store.Models.Chart.AdvIndex.IndexSize.Big;
    if (Model.Report.CTGGJKGXD >= Model.Report.ExhibitionKpiStandard.CTGGJKGXD)
    {
        index3.Type = S4Store.Models.Chart.AdvIndex.IndexType.Green;
    }
    else
    {
        index3.Type = S4Store.Models.Chart.AdvIndex.IndexType.Red;
    }
    index3.Url = Url.Action("GXZL");
    index3.Tip = "广宣质量KPI";


    index3.Title = "传统广宣实际招徕数与应时招徕数目标的差值";
    index3.Value = (Model.Report.GGZLDHPC - Model.Report.GGZLDHPCOfRate).ToString();
    index3.Item1Name = "纸媒广告招徕数";
    index3.Item1Value = Model.Report.GGZLDHPC.ToString();
    index3.Item2Name = "应时招徕数目标";
    index3.Item2Value = Model.Report.GGZLDHPCOfRate.ToString();
    
    AdvIndexs.Add(index3);
}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div style="position:relative; width:100%">
      
        @Html.Partial("../Chart/Column", ChartModel)
        @Html.Partial("../Chart/AdvIndex", AdvIndexs)
    
</div>
</div>


